<script lang="ts">
import {mapState} from 'vuex';
export default {
  name: "App",
  // computed:mapState(['num','age'])
  
  // computed:mapState({
  //   num(state){
  //     return state.num
  //   },
  //   age(state){
  //     return state.age
  //   }
  // })
  computed:{
    ...mapState(['num']),
    ...mapState({
      age(state){
        return state.age
      }
    })
  }
}
</script>

<template>
  <div>
    <h3>app</h3>
    <p>num----->{{num}}</p>
    <p>age----->{{age}}</p>
    <hr/>
    <p>num----->{{num}}</p>
    <p>age----->{{age}}</p>
  </div>
</template>

<style scoped>

</style>
